#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;

int main()
{
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        int sum = 0;    
        int temp = n;
        int a = n / 2;
        int b = (n - a) * 2 / 3;
        int c = n - a - b;
        //cout << a << " " << b << " " << c << endl;
        sum += ceil(a * 1.0/ 10);
        //cout << sum << endl;
        sum += ceil(b * 1.0/ 10);
        //cout << sum << endl;
        sum += ceil(c * 1.0/ 10);
        cout << sum << endl;
    }
    return 0;
}